<template>
  <div>
      <!-- 搜索 -->
    <el-dialog title="修改用户" :visible.sync="thistype" @close="fun(tname)">
      <el-form label-width="80px" :model="form" ref="form">
        <el-form-item label="姓名">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="协议" >
          <el-input v-model="form.xieyi"></el-input>
        </el-form-item>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click="thistype = false">取 消</el-button>
        <el-button type="primary" @click="thistype = false">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: ['type', 'fun', 'tname', 'tablerow'],
  data () {
    return {
      thistype: this.type, // 模态框状态
      form: {
        name: '', // 学员姓名
        xieyi: ''// 协议
      }
    }
  },
  watch: {
    type () {
      this.thistype = this.type
    },
    tablerow () {
      this.form = this.tablerow
    }
  }
}
</script>

<style>
</style>
